﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Company.Hardware
{
    /// <summary>
    /// 称重仪表
    /// </summary>
    public interface IScale
    {
        event Action<string> MessageChanged;
        event Action<double> ValueChanged;

        bool Initialized { get; set; }
        bool Connected { get; set; }
        string Hex { get; set; }
        string Message { get; set; }
        double Value { get; set; }
        bool Init(string portName, int baudRate);
        bool Open();
        bool Close();
        void Trigger(double value);
    }
}
